[network-base]
type = internal/network
interval = 1
format-connected = <label-connected> 
format-disconnected = <label-disconnected>

[module/wlan]
inherit = network-base
interface-type = wireless
format-connected = <ramp-signal> <label-connected>
label-connected = %essid%  %downspeed% 祝%upspeed%

label-disconnected = ✖ No Connect!
label-disconnected-foreground = ${color.menucol-yellow}
label-disconnected-font = 6
ramp-signal-0 = 󰤫
ramp-signal-1 = 󰤠
ramp-signal-2 = 󰤟
ramp-signal-3 = 󰤢
ramp-signal-4 = 󰤥
ramp-signal-5 = 󰤨

[module/eth]
inherit = network-base
interface-type = wired
label-connected = 󰈀 %ifname%  %downspeed% 祝%upspeed%
label-connected-foreground = ${color.foreground}
label-connected-font = 6

label-disconnected = ✖ %ifname% No Connect!
label-disconnected-foreground = ${color.menucol-yellow}
label-disconnected-font = 6

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/launcher]
type = custom/text
content =  

; "content" has the same properties as "format-NAME"
content-font = 7
content-padding = 2
content-foreground = ${color.primary}
; content-underline = ${color.primary}

; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
click-left = "rofi -show drun / -theme ~/.config/rofi/launchers/type-1/style-9.rasi -show-icons"
;;click-middle = ~/.config/polybar/hack/scripts/launcher-full
click-right = ~/.config/polybar/hack/scripts/color-switch.sh &

; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
;;scroll-up = ~/.config/polybar/hack/scripts/launcher.sh &
;;scroll-down = ~/.config/polybar/hack/scripts/color-switch.sh &

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/sysmenu]
type = custom/text
content = ⏻

content-font = 7
content-padding = 2
content-foreground = ${color.primary}

click-left = ~/.config/rofi/powermenu/type-4/powermenu.sh

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/color-switch]
type = custom/text
content = 

content-foreground = ${color.primary}
click-left = bash ~/.config/polybar/hack/scripts/color-switch.sh &

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/sep]
type = custom/text
content = " | "
content-foreground = ${color.background}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/powermenu]
type = custom/text

content = ⏻
content-font = 7
content-padding = 2
format-foreground = ${color.primary}
click-left = bash ~/.config/rofi/powermenu/type-2/powermenu.sh


;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/weather]
type = custom/script
interval = 3600
#format-foreground = ${color.primary}
#label-foreground = ${color.primary}
click-left = python3 ~/.config/polybar/my-scripts/i3-simple-weather/weather.py
click-right = kitty --hold ~/go/bin/wego
exec = python3 ~/.config/polybar/my-scripts/i3-simple-weather/weather.py

[module/trash]
type = custom/script

interval = 3
exec = ~/.config/polybar/my-scripts/trash.sh
format-prefix = "  "

format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.primary}

label-padding = 0
label-foreground = ${color.foreground}

click-left = /bin/rm -rf ~/.local/share/Trash/files/* && /bin/rm -rf ~/.local/share/Trash/info/* && /bin/rm -r /home/deller/.trash_rmt/* && exec dunstify -a I3wm 'Корзина пуста!'
click-right = thunar trash:///

[module/apt-update]
type = custom/script

interval = 20
exec = python3 ~/.config/polybar/my-scripts/info-apt.py
format-prefix = " "

format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.foreground}

label-padding = 0
label-foreground = ${color.foreground}

click-left = kitty --hold sudo nala upgrade
click-right = kitty --hold sudo nala update


[module/temperature]
type = custom/script

interval = 5
exec = sensors | awk '/edge/ {print $2}'
format-prefix = " "

format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.foreground}

label-padding = 0
label-foreground = ${color.foreground}

click-left = kitty --hold sensors
click-right = kitty --hold sensors

[module/crypto]
type = custom/script
interval = 3600
format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.foreground}

label-padding = 0
label-foreground = ${color.foreground}
exec = python3 ~/.config/polybar/my-scripts/polybar-crypto/crypto.py

[module/usd]
type = custom/script

interval = 3600
exec = bash ~/.config/polybar/my-scripts/polybar-crypto/usd-return.sh
format-prefix = "  "

format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.foreground}

label-padding = 0
label-foreground = ${color.foreground} 
[module/eur]
type = custom/script

interval = 3600
exec = bash ~/.config/polybar/my-scripts/polybar-crypto/eur-return.sh
format-prefix = "  "

format-prefix-padding-left = 0
format-prefix-padding-right = 0
format-prefix-foreground = ${color.foreground}

label-padding = 0
label-foreground = ${color.foreground}

[module/info-cava]
type = custom/script
exec = python3 ~/.config/polybar/my-scripts/info-cava.py -f 24 -b 11 -e fffdfc,fffafe,ffeafa,ffc3d2 -c average
click-left = kitty -e cava
click-right = kitty -e cava
tail = true

[module/player-cmus]
type = custom/script
exec = bash ~/.config/polybar/my-scripts/player-cmus.sh
interval = 2
format-prefix = "󰌳 "
click-left = cmus-remote -n &
click-right = cmus-remote -r &
click-middle = cmus-remote -u &

[module/swap]
type = custom/script
exec = ~/.config/polybar/my-scripts/swap.sh
interval = 2
tail = true

[module/bluetooth]
type = custom/script
exec = ~/.config/rofi/rofi-bluetooth/rofi-bluetooth --status
interval = 5
click-left = ~/.config/rofi/rofi-bluetooth/rofi-bluetooth &
click-right = kitty --hold bluetui

[module/display]
type = custom/script
format-prefix = "盛"
interval = 2
exec = echo "$(xrandr --verbose | grep -i brightness | awk '{print $2}') * 100 / 1" | bc

[module/dunst]
type = custom/script
interval = 2 
exec = ~/.config/polybar/my-scripts/dunst/check.sh
click-left = ~/.config/polybar/my-scripts/dunst/run_exit.sh
